<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of User
 *
 * @author Rory
 */
class User {

    protected $name, $userId, $type, $pswd, $email;
    public function __construct() {

    }
    public function setAll($iName, $iType, $iPswd, $iEmail) {
        $this->name = $iName;
        $this->userId = 0;
        $this->type = $iType;
        $this->pswd = $iPswd;
        $this->email = $iEmail;
    }
    public function setName($iName) {
        $this->name = $iName;
    }
    public function setUserId($iUserId) {
        $this->userId = $iUserId;
    }
    public function setType($iType) {
        $this->type = $iType;
    }
    public function setPswd($iPswd) {
        $this->pswd = $iPswd;
    }
    public function setEmail($iEmail) {
        $this->email = $iEmail;
    }
    public function getName() {
        return $this->name;
    }
    public  function getUserId() {
        return $this->userId;
    }
    public function getType() {
        return $this->type;
    }
    public function getPswd() {
        return $this->pswd;
    }
    public function getEmail() {
        return $this->email;
    }
    public function isOwner() {
        return ($this->type == 2);
    }
    public function isAdmin() {
        return ($this->type == 1);
    }

}
?>
